complex_sources = [
    'chip.cpp',
    'chip_abi.cpp',
]  +  chip_interface_sources + blockio_interface_sources

complex_lib = shared_library(
    'Chip',
    complex_sources, 
    include_directories: [include_dirs, chip_inc, '../..', '../../internal/', '../../internal'],
    dependencies: [internal_dep, libmcpp_deps],
    name_prefix: 'lib',
    name_suffix: 'so',
    install: true,
    install_dir: drivers_install_dir,
)

complex_dep = declare_dependency(
    link_with: complex_lib,
    dependencies: [internal_dep, libmcpp_deps],
)

if build_tests
  custom_target(
    'copy_libComplex',
    output: 'copy_libComplex',
    command: ['cp', complex_lib.full_path(), drivers_install_dir],
    depends: complex_lib,
    build_by_default: true,
  )
endif 

complex_headers = [
  'chip.h'
]

install_headers(complex_headers, install_dir : install_inc_dir / 'complex')